
						<!-- <li>
							<a class="update-pro" href="#downloads/klorofil-pro-bootstrap-admin-dashboard-template/?utm_source=klorofil&utm_medium=template&utm_campaign=KlorofilPro" title="Upgrade to Pro" target="_blank"><i class="fa fa-rocket"></i> <span>UPGRADE TO PRO</span></a>
						</li> -->
					
		
		<!-- END NAVBAR -->
		<!-- LEFT SIDEBAR -->
		
							
								
		
							<!-- INPUT SIZING -->
							<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title">新闻添加</h3>
								</div>
								<div class="panel-body">
								<form action="" method="post" enctype="multipart/form-data">
									<input class="form-control input-lg" placeholder="新闻标题" type="text" name="title">
									<br>
									<div class="list">
									<select class="option" class="form-control" name="cate_id">
									<option  value="0">分类</option>
									<?php  foreach ($cate as $key => $val) { ?>
										<option value="<?php echo $val['id'] ?>"><?php echo $val['news'] ?></option>
											<?php	} ?>
									</select>
									</div>
									<br>

									<br>
									<input class="form-control input-sm" placeholder="新闻图片" type="file" form-data" name="url[]" multiple>

									<br>
									<input class="form-control" placeholder="新闻作者" type="text" name="text">
									<br>
									<input class="form-control" placeholder="新闻内容" type="textarea" rows="15" name="textarea">
									<button type="submit" class="btn btn-primary btn-lg btn-block">添加</button>
									</form>
								</div>
							</div>
							<!-- END INPUT SIZING -->
						
							<!-- END INPUT GROUPS -->
						
		
	<!-- END WRAPPER -->
	<!-- Javascript -->
	<script src="resources/admin/assets/vendor/jquery/jquery.min.js"></script>
	<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<script src="assets/scripts/klorofil-common.js"></script>

 <script type="text/javascript">
 		$(function(){

 			$('.list').on('change','select',function(){

 				

 				$(this).nextAll().remove();


 				if ($(this).get(0).selectedIndex==0) {
 					return false;
 				};

 				var id=$(this).val();

 				
 			
 				
 				$.ajax({
 					type:'get',
 					url:'index.php?c=cate&a=add&admin=1&id='+id,
 					dataType:'json',

 					success:function(json){

 						var html='';
 						html+='<select class="option" class="form-control" name="cate_id">';
 						html+='<option value="'+id+'">上一级</option>';
			
						for(i in json){
						html+='<option value="'+json[i].id+'">'+json[i].news+'</option>';
						};	
						html+='</select>';

						$('.list').append(html);
						
	 					}
 					})
 			})


 		})

 </script>